package cn.gcyl.module.biz.dal.mysql.conferenceinvoiceinformation;

import java.util.*;

import cn.gcyl.framework.common.pojo.PageResult;
import cn.gcyl.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.gcyl.framework.mybatis.core.mapper.BaseMapperX;
import cn.gcyl.module.biz.dal.dataobject.conferenceinvoiceinformation.ConferenceInvoiceInformationDO;
import org.apache.ibatis.annotations.Mapper;
import cn.gcyl.module.biz.controller.admin.conferenceinvoiceinformation.vo.*;

/**
 * 会议报名发票信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ConferenceInvoiceInformationMapper extends BaseMapperX<ConferenceInvoiceInformationDO> {

    default PageResult<ConferenceInvoiceInformationDO> selectPage(ConferenceInvoiceInformationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ConferenceInvoiceInformationDO>()
                .eqIfPresent(ConferenceInvoiceInformationDO::getConferenceRegistrationId, reqVO.getConferenceRegistrationId())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoiceType, reqVO.getInvoiceType())
                .likeIfPresent(ConferenceInvoiceInformationDO::getInvoiceUnitName, reqVO.getInvoiceUnitName())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoicePhone, reqVO.getInvoicePhone())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoiceTaxId, reqVO.getInvoiceTaxId())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoiceOpeningBank, reqVO.getInvoiceOpeningBank())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoiceAccountNumber, reqVO.getInvoiceAccountNumber())
                .eqIfPresent(ConferenceInvoiceInformationDO::getInvoiceAddress, reqVO.getInvoiceAddress())
                .betweenIfPresent(ConferenceInvoiceInformationDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ConferenceInvoiceInformationDO::getId));
    }

}